function getUrlVars() {
    var vars = [], hash;
    const begin=window.location.href.indexOf('?') + 1;
    const last=window.location.href.indexOf('#');
    const end=(last>-1)?last:undefined;
    var hashes = window.location.href.slice(begin,end).split('&');
    for (var i = 0; i < hashes.length; i++) {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}

const params = getUrlVars();
const deviceId=params.deviceId||"001";
console.log('deviceId',deviceId)
window.config.cabinetId=deviceId;
console.log('window.config.deviceId',window.config)